package com.lck.blogmanager.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import static com.lck.blogmanager.Enum.CommonConstant.WINDOWS_PATH;

/**
 * @author wyq
 * @version v1.0.0
 * @explain
 * @date 2024/4/1 17:09
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/images/**") // 定义访问图片的URL路径，例如/images/xxx.jpg
                //.addResourceLocations("file:D:/ideaProject/img/");
                .addResourceLocations("file:C:/Users/86133/Desktop/image/");
    }

}
